package net.classes;

import java.util.ArrayList;

public class SearchedWord {
	
	private String word;
	private static int size = 1;
	private ArrayList<String> tokens;
	private int ngramSize;
	
	public void setWord(String w){
		System.out.println(w);
		this.word = w.replaceAll("[^a-zA-Z0-9 *]", "");
		this.ngramSize = 3;
		tokens = Token.tokenizer(w, ngramSize);
	}
	
	public void setWord(String w, int ngram){
		this.word = w.replaceAll("[^a-zA-Z0-9 *]", "");
		this.ngramSize = ngram;
		tokens = Token.tokenizer(w, ngramSize);
	}
	
	public String getWord(){
		return this.word;
	}
	
	public int getSize(){
		return SearchedWord.size;
	}
	
	public ArrayList<String> getTokens(){
		return this.tokens;
	}
	
	public void printTokens(){
		
		for (String s : tokens) {
			System.out.print("\t" + s);
		}
		System.out.println("");
	}
	
	
}
